package com.fq.service.impl;

import com.fq.mapper.UserMapper;
import com.fq.pojo.User;
import com.fq.service.UserService;
import com.fq.util.MybatisUtil;

import java.util.List;
import java.util.Map;

public class UserServiceImpl implements UserService {
    UserMapper userMapper;
    {
        userMapper = MybatisUtil.getMapper(UserMapper.class);
    }

    @Override
    public int delete(int id) {
        return userMapper.delete(id);
    }

    @Override
    public int update(User user) {
        return userMapper.update(user);
    }

    @Override
    public int insert(User user) {
        return userMapper.insert(user);
    }

    @Override
    public List<User> selectAll() {
        return userMapper.selectAll();
    }

    @Override
    public User selectOne(int uid) {
        return userMapper.selectOne(uid);
    }


}
